<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增动力电机型号')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-motor_model-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机类型：</label>
                    <div class="col-sm-8">
                        <select name="driveMotorType" class="form-control" th:with="type=${@dict.getType('engine_type_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">驱动电机型号：</label>
                    <div class="col-sm-8">
                        <input name="driveMotorModel" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机额定功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="driveMotorRatedPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机峰值功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="driveMotorPeakPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机转速 r/min：</label>
                    <div class="col-sm-8">
                        <input name="driveMotorRotationSpeed" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机转矩 N.m：</label>
                    <div class="col-sm-8">
                        <input name="driveMotorTorque" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">Ekg单位载质量能量消耗量 Wh/km.kg：</label>
                    <div class="col-sm-8">
                        <input name="ekgEnergyConsumption" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">电池系统总质量占整车整备质量比例 %：</label>
                    <div class="col-sm-8">
                        <input name="batterySystemMassRatio" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">驱动电机数量：</label>
                    <div class="col-sm-8">
                        <select name="driveMotorQuantity" class="form-control" th:with="type=${@dict.getType('engine_count_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/motor_model"
        $("#form-motor_model-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-motor_model-add').serialize());
            }
        }
    </script>
</body>
</html>